#!/usr/bin/env python 


import os 
import sys


CWD = os.getcwd() 


# -- open .bashrc -- 
bashrc = open(os.getenv("HOME") + "/.bashrc", "a") 


print "==== Install Scala 2.11.0... ====" 
# os.system("wget http://downloads.typesafe.com/scala/2.11.0/scala-2.11.0.tgz")
# os.system("tar -xvf scala-2.11.0.tgz")
# bashrc.write("\n")
# bashrc.write("# ==== for scala 2.11.0 ==== \n")
# bashrc.write("export SCALA_HOME=" + os.getcwd() + "/scala-2.11.0 \n")
# bashrc.write("export PATH=" + os.getcwd() + "/scala-2.11.0/bin:$PATH \n")
# bashrc.write("\n")
# os.system("source " + os.getenv("HOME") + "/.bashrc")


print "==== generate uc_setting ===="
uc_settings = open(CWD+"/bin/uc_settings.py", "w")
uc_settings.write("UC_HOME=\""+CWD+"\" \n")
uc_settings.close()


print "==== Install Ubuntu-charlatan tool ====" 
# bashrc.write("export PATH=" + CWD + "/bin:$PATH")
# bashrc.write("\n")


# -- close .bashrc -- 
bashrc.close() 
